package main

import (
	"ccGame/common"
	"ccGame/router"
	"github.com/Sirupsen/logrus"
	"github.com/valyala/fasthttp"
	"net"
)

func main()  {


	route  := router.RouterManager()
	server := &fasthttp.Server{}
	server.Handler = route.Handler

	listener , err  := net.Listen("tcp",common.NetworkConf.Host + ":" + common.NetworkConf.Port)
	if err != nil {
		panic(err)
	}

	logrus.Info("start listen : "+ common.NetworkConf.Host + ":" + common.NetworkConf.Port)
	err = server.Serve(listener)
	if err != nil {
		panic(err)
	}
}
